//validation
$().ready(function random() {
    // validate signup form on keyup and submit
    $("#registration_form").validate({
        rules: {
            Username: "required",
            Main_Email: {
                required: true,
                email: true
            },
            Main_Password: "required",
            Main_Password_bis: {
                required: true,
                equalTo: "#Main_Password"
            }
        },
        messages: {
            Username: "Please enter a username",
            Main_Password: "Please enter valid password",
            Main_Email: {
                required: "Please enter an email address",
                email: "Please enter a valid email address (e.g. john.doe@mail.com)"
            }
        }
    });
});